import axios from '@/libs/api.request'

export const list = (paras) => {
  return axios.request({
    url: '/admin/class/list',
    params: paras,
    method: 'get'
  })
}

export const save = (data) => {
  return axios.request({
    url: '/admin/class/save',
    data,
    method: 'post'
  })
}

export const update = (data) => {
  return axios.request({
    url: '/admin/class/update',
    data,
    method: 'post'
  })
}

export const del = (data) => {
  return axios.request({
    url: '/admin/class/delete',
    data,
    method: 'post'
  })
}

export const batchDelete = (data) => {
  return axios.request({
    url: '/admin/class/batchDelete',
    data,
    method: 'post'
  })
}

export const listFind = (paras) => {
  return axios.request({
    url: '/admin/class/listFind',
    params: paras,
    method: 'get'
  })
}

// 通过专业id ，获取班级
export const queryFindClassByMid = (data) => {
  return axios.request({
    url: '/admin/class/queryFindClassByMid',
    data,
    method: 'post'
  })
}

// 查看老师下方已分配班级
export const queryFindClassMajorCollegeListByTid = (data) => {
  return axios.request({
    url: '/admin/class/queryFindClassMajorCollegeListByTid',
    data,
    method: 'post'
  })
}

// 插入班级-老师关联数据
export const saveSC = (data) => {
  return axios.request({
    url: '/admin/class/saveSC',
    data,
    method: 'post'
  })
}
